package com.zmn.oms.model.entity.report;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.zmn.oms.model.entity.work.OrderBaseEsQuery;
import com.zmn.oms.model.es.ZmnEsFieldType;
import com.zmn.oms.model.es.ZmnToEs;
import lombok.Data;

import java.util.List;

/**
 * @author ：SongWeidong
 * @date ：2021/5/10 18:02
 * @description：ES支付明细报表查询
 */
@Data
public class EsReportPayQuery extends OrderBaseEsQuery {

    /**
     * 聚合id
     */
    private String groupFiled;

    /**
     * 时期类型
     * 1，完成时间 2，收单时间 3，算账时间， 4，支付时间
     */
    private Integer dateType;

    /**
     * 支付渠道
     */
    @ZmnToEs(map = "payChannelId", type = ZmnEsFieldType.Integer)
    private Integer payChannelId;

    /**
     * 支付渠道，非
     */
    @ZmnToEs(map = "payChannelId", type = ZmnEsFieldType.NotIn)
    private Integer nonPayChannelId;

    /**
     * 服务分类
     */
    @ZmnToEs(map = "servCategId", type = ZmnEsFieldType.Integer)
    private Integer servCategId;

    /**
     * 交易类型
     */
    @ZmnToEs(map = "tradeType", type = ZmnEsFieldType.Integer)
    private Integer tradeType;

    /**
     * 交易类型
     */
    @ZmnToEs(map = "tradeType", type = ZmnEsFieldType.NotIn)
    private Integer nonTradeType;

    /**
     * 工单号code
     */
    @ZmnToEs(map = "workId", type = ZmnEsFieldType.Long)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long code;

    /**
     * 工单号后六位
     */
    @ZmnToEs(map = "codeEnd6", type = ZmnEsFieldType.Text)
    private String codeEnd6;

    /**
     * 时间
     */
    private String dateTime;

    /**
     * 公司id
     */
    @ZmnToEs(map = "companyId", type = ZmnEsFieldType.Integer)
    private Integer companyId;

    /**
     * 城市id
     */
    @ZmnToEs(map = "cityId", type = ZmnEsFieldType.Integer)
    private Integer cityId;

    /**
     * 完成时间
     */
    @ZmnToEs(map = "completeTime", type = ZmnEsFieldType.Date)
    private String completeTime;

    /**
     * 收单时间
     */
    @ZmnToEs(map = "checkoutTime", type = ZmnEsFieldType.Date)
    private String checkoutTime;

    /**
     * 算账时间
     */
    @ZmnToEs(map = "accountTime", type = ZmnEsFieldType.Date)
    private String accountTime;

    /**
     * 算账时间
     */
    @ZmnToEs(map = "payTime", type = ZmnEsFieldType.Date)
    private String payTime;

    /**
     * 导出任务id
     */
    private Integer exportTaskId;

    /**
     * 导出类型：1收付汇总导出，2退款汇总导出，3支付明细导出
     */
    private Integer exportType;

    /**
     * 导出token
     */
    private String exportToken;

    /**
     * 支付状态
     */
    @ZmnToEs(map = "payStatus", type = ZmnEsFieldType.Arr)
    private List<Integer> payStatusList;

    /**
     * 支付状态
     */
    @ZmnToEs(map = "payStatus", type = ZmnEsFieldType.Integer)
    private Integer payStatus;

    /**
     * 是否删除 1未删除 2已删除
     */
    @ZmnToEs(map = "deleted", type = ZmnEsFieldType.Integer)
    private Integer deleted;

    /**
     * 是否重复支付 1 否 2是
     */
    @ZmnToEs(map = "duplicate", type = ZmnEsFieldType.Integer)
    private Integer duplicate;

}
